package com.dragon.modules.yuegou.query.park;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.park.CouponMemberRefEntity;
import com.dragon.modules.yuegou.enums.park.CouponMemberRefStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;
/**
 * 停车券与会员关系表 动态查询条件
 * 
 * @author px
 * @date 2019-04-18 09:58:13
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class CouponMemberRefQuery extends CouponMemberRefEntity implements Query<CouponMemberRefEntity> {

    /** 主键查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 停车券与商户ID查询条件 */
	@JsonUnwrapped(prefix = "parkCouponMerchantId")
	private Condition<String> parkCouponMerchantIdCondition;

    /** 停车券发放ID查询条件 */
	@JsonUnwrapped(prefix = "parkCouponGrantId")
	private Condition<String> parkCouponGrantIdCondition;

    /** 停车券ID查询条件 */
	@JsonUnwrapped(prefix = "couponTemplate")
	private Condition<String> couponTemplateCondition;

    /** 停车券名称查询条件 */
	@JsonUnwrapped(prefix = "couponTemplateName")
	private Condition<String> couponTemplateNameCondition;

    /** 获取时间查询条件 */
	@JsonUnwrapped(prefix = "getTime")
	private Condition<LocalDateTime> getTimeCondition;

    /** 有效开始时间查询条件 */
	@JsonUnwrapped(prefix = "beginTime")
	private Condition<LocalDateTime> beginTimeCondition;

    /** 到期时间（有效结束时间）查询条件 */
	@JsonUnwrapped(prefix = "expireTime")
	private Condition<LocalDateTime> expireTimeCondition;

    /** 使用时间查询条件 */
	@JsonUnwrapped(prefix = "useTime")
	private Condition<LocalDateTime> useTimeCondition;

    /** 停车记录ID查询条件 */
	@JsonUnwrapped(prefix = "parkInfoId")
	private Condition<String> parkInfoIdCondition;

    /** 商户ID查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 发放人查询条件 */
	@JsonUnwrapped(prefix = "grantBy")
	private Condition<String> grantByCondition;

    /** [枚举]状态：0-未使用-UNUSE、1-已使用-USE、2-已过期-EXPIRED查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<CouponMemberRefStatus> statusCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public CouponMemberRefQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public CouponMemberRefQuery(CouponMemberRefEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public CouponMemberRefQuery(CouponMemberRefQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.parkCouponMerchantIdCondition != null) {
			this.parkCouponMerchantIdCondition = other.parkCouponMerchantIdCondition.copy();
		}
		if(other.parkCouponGrantIdCondition != null) {
			this.parkCouponGrantIdCondition = other.parkCouponGrantIdCondition.copy();
		}
		if(other.couponTemplateCondition != null) {
			this.couponTemplateCondition = other.couponTemplateCondition.copy();
		}
		if(other.couponTemplateNameCondition != null) {
			this.couponTemplateNameCondition = other.couponTemplateNameCondition.copy();
		}
		if(other.getTimeCondition != null) {
			this.getTimeCondition = other.getTimeCondition.copy();
		}
		if(other.beginTimeCondition != null) {
			this.beginTimeCondition = other.beginTimeCondition.copy();
		}
		if(other.expireTimeCondition != null) {
			this.expireTimeCondition = other.expireTimeCondition.copy();
		}
		if(other.useTimeCondition != null) {
			this.useTimeCondition = other.useTimeCondition.copy();
		}
		if(other.parkInfoIdCondition != null) {
			this.parkInfoIdCondition = other.parkInfoIdCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.grantByCondition != null) {
			this.grantByCondition = other.grantByCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
	}

	@Override
	public QueryWrapper<CouponMemberRefEntity> toQueryWrapper() {
		QueryWrapper<CouponMemberRefEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (parkCouponMerchantIdCondition != null) {
			parkCouponMerchantIdCondition.toWrapper(wrapper, COL_PARK_COUPON_MERCHANT_ID);
		}
		if (parkCouponGrantIdCondition != null) {
			parkCouponGrantIdCondition.toWrapper(wrapper, COL_PARK_COUPON_GRANT_ID);
		}
		if (couponTemplateCondition != null) {
			couponTemplateCondition.toWrapper(wrapper, COL_COUPON_TEMPLATE);
		}
		if (couponTemplateNameCondition != null) {
			couponTemplateNameCondition.toWrapper(wrapper, COL_COUPON_TEMPLATE_NAME);
		}
		if (getTimeCondition != null) {
			getTimeCondition.toWrapper(wrapper, COL_GET_TIME);
		}
		if (beginTimeCondition != null) {
			beginTimeCondition.toWrapper(wrapper, COL_BEGIN_TIME);
		}
		if (expireTimeCondition != null) {
			expireTimeCondition.toWrapper(wrapper, COL_EXPIRE_TIME);
		}
		if (useTimeCondition != null) {
			useTimeCondition.toWrapper(wrapper, COL_USE_TIME);
		}
		if (parkInfoIdCondition != null) {
			parkInfoIdCondition.toWrapper(wrapper, COL_PARK_INFO_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (grantByCondition != null) {
			grantByCondition.toWrapper(wrapper, COL_GRANT_BY);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		return wrapper;
	}

	/**
	 * 构造并返回主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置主键查询条件
	 * 
	 * @param idCondition 主键查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回停车券与商户ID查询条件
	 * 
	 * @return parkCouponMerchantIdCondition 停车券与商户ID查询条件
	 */
	public Condition<String> parkCouponMerchantId() {
		this.parkCouponMerchantIdCondition = new Condition<>();
		return this.parkCouponMerchantIdCondition;
	}
	
	/**
	 * 获取停车券与商户ID查询条件
	 * 
	 * @return parkCouponMerchantIdCondition 停车券与商户ID查询条件
	 */
	public Condition<String> getParkCouponMerchantIdCondition() {
		return parkCouponMerchantIdCondition;
	}

	/**
	 * 设置停车券与商户ID查询条件
	 * 
	 * @param parkCouponMerchantIdCondition 停车券与商户ID查询条件
	 */
	public void setParkCouponMerchantIdCondition(Condition<String> parkCouponMerchantIdCondition) {
		this.parkCouponMerchantIdCondition = parkCouponMerchantIdCondition;
	}

	/**
	 * 构造并返回停车券发放ID查询条件
	 * 
	 * @return parkCouponGrantIdCondition 停车券发放ID查询条件
	 */
	public Condition<String> parkCouponGrantId() {
		this.parkCouponGrantIdCondition = new Condition<>();
		return this.parkCouponGrantIdCondition;
	}
	
	/**
	 * 获取停车券发放ID查询条件
	 * 
	 * @return parkCouponGrantIdCondition 停车券发放ID查询条件
	 */
	public Condition<String> getParkCouponGrantIdCondition() {
		return parkCouponGrantIdCondition;
	}

	/**
	 * 设置停车券发放ID查询条件
	 * 
	 * @param parkCouponGrantIdCondition 停车券发放ID查询条件
	 */
	public void setParkCouponGrantIdCondition(Condition<String> parkCouponGrantIdCondition) {
		this.parkCouponGrantIdCondition = parkCouponGrantIdCondition;
	}

	/**
	 * 构造并返回停车券ID查询条件
	 * 
	 * @return couponTemplateCondition 停车券ID查询条件
	 */
	public Condition<String> couponTemplate() {
		this.couponTemplateCondition = new Condition<>();
		return this.couponTemplateCondition;
	}
	
	/**
	 * 获取停车券ID查询条件
	 * 
	 * @return couponTemplateCondition 停车券ID查询条件
	 */
	public Condition<String> getCouponTemplateCondition() {
		return couponTemplateCondition;
	}

	/**
	 * 设置停车券ID查询条件
	 * 
	 * @param couponTemplateCondition 停车券ID查询条件
	 */
	public void setCouponTemplateCondition(Condition<String> couponTemplateCondition) {
		this.couponTemplateCondition = couponTemplateCondition;
	}

	/**
	 * 构造并返回停车券名称查询条件
	 * 
	 * @return couponTemplateNameCondition 停车券名称查询条件
	 */
	public Condition<String> couponTemplateName() {
		this.couponTemplateNameCondition = new Condition<>();
		return this.couponTemplateNameCondition;
	}
	
	/**
	 * 获取停车券名称查询条件
	 * 
	 * @return couponTemplateNameCondition 停车券名称查询条件
	 */
	public Condition<String> getCouponTemplateNameCondition() {
		return couponTemplateNameCondition;
	}

	/**
	 * 设置停车券名称查询条件
	 * 
	 * @param couponTemplateNameCondition 停车券名称查询条件
	 */
	public void setCouponTemplateNameCondition(Condition<String> couponTemplateNameCondition) {
		this.couponTemplateNameCondition = couponTemplateNameCondition;
	}

	/**
	 * 构造并返回获取时间查询条件
	 * 
	 * @return getTimeCondition 获取时间查询条件
	 */
	public Condition<LocalDateTime> getTime() {
		this.getTimeCondition = new Condition<>();
		return this.getTimeCondition;
	}
	
	/**
	 * 获取获取时间查询条件
	 * 
	 * @return getTimeCondition 获取时间查询条件
	 */
	public Condition<LocalDateTime> getGetTimeCondition() {
		return getTimeCondition;
	}

	/**
	 * 设置获取时间查询条件
	 * 
	 * @param getTimeCondition 获取时间查询条件
	 */
	public void setGetTimeCondition(Condition<LocalDateTime> getTimeCondition) {
		this.getTimeCondition = getTimeCondition;
	}

	/**
	 * 构造并返回有效开始时间查询条件
	 * 
	 * @return beginTimeCondition 有效开始时间查询条件
	 */
	public Condition<LocalDateTime> beginTime() {
		this.beginTimeCondition = new Condition<>();
		return this.beginTimeCondition;
	}
	
	/**
	 * 获取有效开始时间查询条件
	 * 
	 * @return beginTimeCondition 有效开始时间查询条件
	 */
	public Condition<LocalDateTime> getBeginTimeCondition() {
		return beginTimeCondition;
	}

	/**
	 * 设置有效开始时间查询条件
	 * 
	 * @param beginTimeCondition 有效开始时间查询条件
	 */
	public void setBeginTimeCondition(Condition<LocalDateTime> beginTimeCondition) {
		this.beginTimeCondition = beginTimeCondition;
	}

	/**
	 * 构造并返回到期时间（有效结束时间）查询条件
	 * 
	 * @return expireTimeCondition 到期时间（有效结束时间）查询条件
	 */
	public Condition<LocalDateTime> expireTime() {
		this.expireTimeCondition = new Condition<>();
		return this.expireTimeCondition;
	}
	
	/**
	 * 获取到期时间（有效结束时间）查询条件
	 * 
	 * @return expireTimeCondition 到期时间（有效结束时间）查询条件
	 */
	public Condition<LocalDateTime> getExpireTimeCondition() {
		return expireTimeCondition;
	}

	/**
	 * 设置到期时间（有效结束时间）查询条件
	 * 
	 * @param expireTimeCondition 到期时间（有效结束时间）查询条件
	 */
	public void setExpireTimeCondition(Condition<LocalDateTime> expireTimeCondition) {
		this.expireTimeCondition = expireTimeCondition;
	}

	/**
	 * 构造并返回使用时间查询条件
	 * 
	 * @return useTimeCondition 使用时间查询条件
	 */
	public Condition<LocalDateTime> useTime() {
		this.useTimeCondition = new Condition<>();
		return this.useTimeCondition;
	}
	
	/**
	 * 获取使用时间查询条件
	 * 
	 * @return useTimeCondition 使用时间查询条件
	 */
	public Condition<LocalDateTime> getUseTimeCondition() {
		return useTimeCondition;
	}

	/**
	 * 设置使用时间查询条件
	 * 
	 * @param useTimeCondition 使用时间查询条件
	 */
	public void setUseTimeCondition(Condition<LocalDateTime> useTimeCondition) {
		this.useTimeCondition = useTimeCondition;
	}

	/**
	 * 构造并返回停车记录ID查询条件
	 * 
	 * @return parkInfoIdCondition 停车记录ID查询条件
	 */
	public Condition<String> parkInfoId() {
		this.parkInfoIdCondition = new Condition<>();
		return this.parkInfoIdCondition;
	}
	
	/**
	 * 获取停车记录ID查询条件
	 * 
	 * @return parkInfoIdCondition 停车记录ID查询条件
	 */
	public Condition<String> getParkInfoIdCondition() {
		return parkInfoIdCondition;
	}

	/**
	 * 设置停车记录ID查询条件
	 * 
	 * @param parkInfoIdCondition 停车记录ID查询条件
	 */
	public void setParkInfoIdCondition(Condition<String> parkInfoIdCondition) {
		this.parkInfoIdCondition = parkInfoIdCondition;
	}

	/**
	 * 构造并返回商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID查询条件
	 * 
	 * @param merchantIdCondition 商户ID查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回发放人查询条件
	 * 
	 * @return grantByCondition 发放人查询条件
	 */
	public Condition<String> grantBy() {
		this.grantByCondition = new Condition<>();
		return this.grantByCondition;
	}
	
	/**
	 * 获取发放人查询条件
	 * 
	 * @return grantByCondition 发放人查询条件
	 */
	public Condition<String> getGrantByCondition() {
		return grantByCondition;
	}

	/**
	 * 设置发放人查询条件
	 * 
	 * @param grantByCondition 发放人查询条件
	 */
	public void setGrantByCondition(Condition<String> grantByCondition) {
		this.grantByCondition = grantByCondition;
	}

	/**
	 * 构造并返回[枚举]状态：0-未使用-UNUSE、1-已使用-USE、2-已过期-EXPIRED查询条件
	 * 
	 * @return statusCondition [枚举]状态：0-未使用-UNUSE、1-已使用-USE、2-已过期-EXPIRED查询条件
	 */
	public Condition<CouponMemberRefStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取[枚举]状态：0-未使用-UNUSE、1-已使用-USE、2-已过期-EXPIRED查询条件
	 * 
	 * @return statusCondition [枚举]状态：0-未使用-UNUSE、1-已使用-USE、2-已过期-EXPIRED查询条件
	 */
	public Condition<CouponMemberRefStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]状态：0-未使用-UNUSE、1-已使用-USE、2-已过期-EXPIRED查询条件
	 * 
	 * @param statusCondition [枚举]状态：0-未使用-UNUSE、1-已使用-USE、2-已过期-EXPIRED查询条件
	 */
	public void setStatusCondition(Condition<CouponMemberRefStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

}
